using System;
using System.IO;
using System.Xml;
using System.Windows.Forms;
using needle.UI.Controls.Flat.Windows.Forms;

namespace needle.UI.Controls.Flat.Windows.Forms
{
    public class TabbedGroupsCloseRequestEventArgs : EventArgs
	{
	    protected TabGroupLeaf mtgl;
	    protected needle.UI.Controls.Flat.Windows.Forms.TabControl mtc;
	    protected needle.UI.Controls.Flat.Windows.Forms.TabPage mtp;
	    protected bool mcancel;
	
		#region Constructors
		
		public TabbedGroupsCloseRequestEventArgs(TabGroupLeaf tgl, needle.UI.Controls.Flat.Windows.Forms.TabControl tc, needle.UI.Controls.Flat.Windows.Forms.TabPage tp)
		{
		    mtgl = tgl;
		    mtc = tc;
		    mtp = tp;
		    mcancel = false;
		}

		#endregion
		
		#region Properties
		
		public TabGroupLeaf Leaf
		{
		    get { return mtgl; }
		}
    
        public needle.UI.Controls.Flat.Windows.Forms.TabControl TabControl
        {
            get { return mtc; }
        }

        public needle.UI.Controls.Flat.Windows.Forms.TabPage TabPage
        {
            get { return mtp; }
        }
        
        public bool Cancel
        {
            get { return mcancel; }
            set { mcancel = value; }
        }

		#endregion
    }

    public class TabbedGroupsContextMenuEventArgs : TabbedGroupsCloseRequestEventArgs
    {
        protected ContextMenu mcontextMenu;
	
		#region Constructors
		
		public TabbedGroupsContextMenuEventArgs(TabGroupLeaf tgl, needle.UI.Controls.Flat.Windows.Forms.TabControl tc, 
                                      needle.UI.Controls.Flat.Windows.Forms.TabPage tp, ContextMenu contextMenu)
            : base(tgl, tc, tp)
        {
            mcontextMenu = contextMenu;
        }

		#endregion
		
		#region Properties

		public ContextMenu ContextMenu
        {
            get { return mcontextMenu; }
        }    

		#endregion
    }
    
    public class TabbedGroupsPageLoadingEventArgs : EventArgs
    {
        protected needle.UI.Controls.Flat.Windows.Forms.TabPage mtp;
        protected XmlTextReader mxmlIn;
        protected bool mcancel;
        
		#region Constructors

		public TabbedGroupsPageLoadingEventArgs(needle.UI.Controls.Flat.Windows.Forms.TabPage tp, XmlTextReader xmlIn)
        {
            mtp = tp;
            mxmlIn = xmlIn;
            mcancel = false;
        }

		#endregion
        
		#region Properties

		public needle.UI.Controls.Flat.Windows.Forms.TabPage TabPage
        {
            get { return mtp; }
        }
        
        public XmlTextReader XmlIn
        {
            get { return mxmlIn; }
        }
        
        public bool Cancel
        {
            get { return mcancel; }
            set { mcancel = value; }
        }

		#endregion
    }    

    public class TabbedGroupsPageSavingEventArgs : EventArgs
    {
        protected needle.UI.Controls.Flat.Windows.Forms.TabPage mtp;
        protected XmlTextWriter mxmlOut;
        
		#region Constructors

		public TabbedGroupsPageSavingEventArgs(needle.UI.Controls.Flat.Windows.Forms.TabPage tp, XmlTextWriter xmlOut)
        {
            mtp = tp;
            mxmlOut = xmlOut;
        }

		#endregion
        
		#region Properties
		
		public needle.UI.Controls.Flat.Windows.Forms.TabPage TabPage
        {
            get { return mtp; }
        }
        
        public XmlTextWriter XmlOut
        {
            get { return mxmlOut; }
        }

		#endregion
    }    
}
